import request from '@/config/axios'

// 分页
export const getAlgorithmPage = async (params: any) => {
  return await request.get({ url: '/system/algorithm/page', params })
}

//算法列表
export const getAlgorithmPageQuery= async (params: any) => {
  return await request.get({ url: '/system/algorithm/list', params })
}

// 更新（整体对象）
export const updateAlgorithm = async (data: any) => {
  return await request.post({ url: '/system/algorithm/update', data })
}

// 删除
export const deleteAlgorithm = async (id: number) => {
  return await request.delete({ url: '/system/algorithm/delete', params: { id } })
}

// 获取导入地址
export const getImportUrl = () => {
  return import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/system/algorithm/upload'
}


